Skip to content

MixIS vignette by Luca Silva and Giacomo Zanella#210

Merged
jgabry merged 6 commits into
masterfrom
mixis
Mar 23, 2023
Merged

MixIS vignette by Luca Silva and Giacomo Zanella#210
jgabry merged 6 commits into
masterfrom
mixis

Conversation

@avehtari

Copy link
Copy Markdown
Member

Luca Silva and Giacomo Zanella created a vignette, which I slightly edited and added data to the package. The vignette demonstrates the mixture IS approach by Silva and Zanella (2022).

I hope the vignette is not too slow and with too big data?

@avehtari avehtari requested a review from jgabry December 27, 2022 13:38
@codecov-commenter

codecov-commenter commented Dec 27, 2022

Copy link
Copy Markdown

Codecov Report

Merging #210 (2d4364f) into master (0fce33b) will not change coverage.
The diff coverage is n/a.

❗ Current head 2d4364f differs from pull request most recent head ffd9733. Consider uploading reports for the commit ffd9733 to get more accurate results

@@           Coverage Diff           @@
##           master     #210   +/-   ##
=======================================
  Coverage   93.48%   93.48%           
=======================================
  Files          29       29           
  Lines        2715     2715           
=======================================
  Hits         2538     2538           
  Misses        177      177           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jgabry jgabry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, except for the one NaN issue I mentioned in my other comment

Comment thread vignettes/loo2-mixis.Rmd
Comment on lines +166 to +173
elpd_loo <- voice_loo$elpd_loo
```

We can then compute the root mean squared error (RMSE) of the PSIS and mixture estimators relative to such benchmark values.
```{r}
elpd_psis <- loo_post$pointwise[,1]
print(paste("RMSE(PSIS) =",round( sqrt(mean((elpd_loo-elpd_psis)^2)) ,2)))
print(paste("RMSE(MixIS) =",round( sqrt(mean((elpd_loo-elpd_mixis)^2)) ,2)))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run this these come out as NaN. It looks like voice_loo has columns "X" and "bk_loo" but no column elpd_loo. So voice_loo$elpd_loo comes out to be NULL.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to fix this on Thursday

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fixed now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll take a look soon

@jgabry

jgabry commented Mar 21, 2023

Copy link
Copy Markdown
Member

I hope the vignette is not too slow and with too big data?

I think the speed and data size are ok, so just the one problem I pointed out above

@jgabry jgabry mentioned this pull request Mar 22, 2023

@jgabry jgabry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, merging now! I will include this in the 2.6.0 release that I'm preparing.

@jgabry jgabry merged commit 88a3370 into master Mar 23, 2023
@jgabry jgabry deleted the mixis branch March 23, 2023 19:12
@jgabry

jgabry commented Mar 31, 2023

Copy link
Copy Markdown
Member

@avehtari This is now online. Here's the URL for the vignette: https://mc-stan.org/loo/articles/loo2-mixis.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants